<?php

namespace SL\FrontBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class ProjetType extends AbstractType
{
    /**
     * @param FormBuilderInterface $builder
     * @param array $options
     */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('name', 'text')
            ->add('date', 'date')
            ->add('lieu', 'text')
			->add('file', 'file')
			->add('maitre_ouvrage', 'text',  array('required' => false))
			->add('mission', 'text',  array('required' => false))
			->add('cout', 'text',  array('required' => false))
			->add('surface', 'text',  array('required' => false))
		    ->add('description_title1', 'text',  array('required' => false))	
            ->add('description_1', 'textarea',  array('required' => false))
			->add('description_title2', 'text',  array('required' => false))
			->add('description_2', 'textarea',  array('required' => false))
			->add('description_title3', 'text',  array('required' => false))	
			->add('description_3', 'textarea',  array('required' => false))
            ->add('recompense', 'text',  array('required' => false));
        ;
    }
    
    /**
     * @param OptionsResolverInterface $resolver
     */
    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'SL\FrontBundle\Entity\Projet'
        ));
    }

    /**
     * @return string
     */
    public function getName()
    {
        return 'sl_frontbundle_projet';
    }
}
